//
// Created by xili on 2024/8/6 19:14.
// Go big or go home.
//
#include <vector>
#include <unordered_map>

using namespace std;

class Solution {
public:
    bool divideArray(vector<int> &nums) {
        unordered_map<int, int> ump;
        for (auto &item: nums) {
            ump[item]++;
        }
        for (auto &item: ump) {
            if ((item.second & 1) != 0) {
                return false;
            }
        }
        return true;
    }
};